<?php /* Smarty version 2.6.26, created on 2012-05-12 14:28:03
         compiled from login.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'replace', 'login.tpl', 85, false),array('modifier', 'regex_replace', 'login.tpl', 85, false),array('function', 'rlHook', 'login.tpl', 196, false),)), $this); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>

<title><?php echo $this->_tpl_vars['lang']['login_to']; ?>
 <?php echo $this->_tpl_vars['lang']['rl_admin_panel']; ?>
</title>

<meta name="generator" content="reefless_admin" />
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $this->_tpl_vars['config']['encoding']; ?>
" />
<link href="<?php echo $this->_tpl_vars['rlTplBase']; ?>
css/login.css" type="text/css" rel="stylesheet" />
<link href="<?php echo $this->_tpl_vars['rlTplBase']; ?>
css/style.css" type="text/css" rel="stylesheet" />
<link rel="shortcut icon" href="<?php echo $this->_tpl_vars['rlTplBase']; ?>
img/favicon.ico" />
<link href="<?php echo $this->_tpl_vars['rlTplBase']; ?>
css/ext/ext-all.css" type="text/css" rel="stylesheet" />
<link href="<?php echo $this->_tpl_vars['rlTplBase']; ?>
css/ext/rlExt.css" type="text/css" rel="stylesheet" />

<?php echo $this->_tpl_vars['ajaxJavascripts']; ?>


<script type="text/javascript" src="<?php echo @RL_LIBS_URL; ?>
jquery/jquery.js"></script>
<script type="text/javascript" src="<?php echo @RL_LIBS_URL; ?>
extJs/ext-base.js"></script>
<script type="text/javascript" src="<?php echo @RL_LIBS_URL; ?>
extJs/ext-all.js"></script>
<!--script type="text/javascript" src="<?php echo $this->_tpl_vars['rlBase']; ?>
js/lib.js"></script-->
<script type="text/javascript" src="<?php echo $this->_tpl_vars['rlBase']; ?>
js/login.js"></script>
<script type="text/javascript" src="<?php echo $this->_tpl_vars['rlBase']; ?>
js/md5.js"></script>

</head>
<body>
<div id="height">
	<div id="middle">
		<div id="login_block">
			<div class="top">
				<div class="left"></div>
				<div class="center"></div>
				<div class="right"></div>
			</div>
			<div class="clear"></div>
			
			<div class="middle_outer">
				<div class="middle_inner">
					<div id="logo"></div>
					
					<form name="login" action="" method="post" onsubmit="return false;">
						<div class="relative" style="margin: 0 0 5px">
							<input style="width: 215px;" maxlength="25" type="text" id="username" name="username" />
							<div id="username_hint" class="input_hint"><?php echo $this->_tpl_vars['lang']['username']; ?>
</div>
						</div>
						
						<div class="relative" style="margin: 0 0 5px">
							<input style="width: 215px;" maxlength="25" type="password" id="password" name="password" />
							<div id="password_hint" class="input_hint"><?php echo $this->_tpl_vars['lang']['password']; ?>
</div>
						</div>
						
						<select <?php if ($this->_tpl_vars['langCount'] < 2): ?>class="disabled"<?php endif; ?> title="<?php echo $this->_tpl_vars['lang']['rl_interface']; ?>
" id="interface" style="width: 100px;" <?php if ($this->_tpl_vars['langCount'] < 2): ?>disabled="disabled"<?php endif; ?>>
							<?php $_from = $this->_tpl_vars['languages']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['lang_foreach'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['lang_foreach']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['languages']):
        $this->_foreach['lang_foreach']['iteration']++;
?>
								<option value="<?php echo $this->_tpl_vars['languages']['Code']; ?>
" <?php if (@RL_LANG_CODE == $this->_tpl_vars['languages']['Code']): ?> selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['languages']['name']; ?>
</option>
							<?php endforeach; endif; unset($_from); ?>
						</select>
						
						<div style="margin-top: 20px;">
							<input id="login_button" type="submit" name="go" value="<?php echo $this->_tpl_vars['lang']['login']; ?>
" />
						</div>
					</form>
				</div>
			</div>
			
			<div class="bottom">
				<div class="left"></div>
				<div class="center"></div>
				<div class="right"></div>
			</div>
		</div>
	</div>
	<div id="crosspiece"></div>
</div>

<!-- copyrights -->
<div id="login_footer">
	&copy; <a href="<?php echo $this->_tpl_vars['lang']['flynax_url']; ?>
"><?php echo $this->_tpl_vars['lang']['copy_rights']; ?>
</a> <?php echo $this->_tpl_vars['lang']['version']; ?>
 <b><?php echo $this->_tpl_vars['config']['rl_version']; ?>
</b>
</div>
<!-- copyrights end -->

<script type="text/javascript">//<![CDATA[
var sec_key = "<?php echo $this->_tpl_vars['config']['security_key']; ?>
";
var lang = new Array();

<?php $_from = $this->_tpl_vars['ext_phrases']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['phrase']):
?>
	lang["<?php echo $this->_tpl_vars['key']; ?>
"] = "<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['phrase'])) ? $this->_run_mod_handler('replace', true, $_tmp, '/', '&002F;') : smarty_modifier_replace($_tmp, '/', '&002F;')))) ? $this->_run_mod_handler('regex_replace', true, $_tmp, '/[\r\t\n]/', '<br />') : smarty_modifier_regex_replace($_tmp, '/[\r\t\n]/', '<br />')); ?>
";
<?php endforeach; endif; unset($_from); ?>

<?php if (isset ( $_GET['session_expired'] ) || $_GET['action'] == 'session_expired'): ?>
	fail_alert('', '<?php echo $this->_tpl_vars['lang']['session_expired']; ?>
');
<?php endif; ?>

<?php echo '

var is_visible = true;

$(document).ready(function(){
	eventListener();
	
	/* submit handler */
	$(\'#login_button\').click(function(){
		jsLogin("'; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['lang']['rl_empty_username'])) ? $this->_run_mod_handler('regex_replace', true, $_tmp, '/[\r\t\n]/', '<br />') : smarty_modifier_regex_replace($_tmp, '/[\r\t\n]/', '<br />')); ?>
<?php echo '", "'; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['lang']['rl_empty_pass'])) ? $this->_run_mod_handler('regex_replace', true, $_tmp, '/[\r\t\n]/', '<br />') : smarty_modifier_regex_replace($_tmp, '/[\r\t\n]/', '<br />')); ?>
<?php echo '");
	});
	
	/* input fields handler */
	$(\'#username\').focus(function(){
		$(\'#username_hint\').fadeOut();
	}).click(function(){
		$(\'#username_hint\').fadeOut();
	}).keydown(function(){
		$(\'#username_hint\').fadeOut(\'fast\');
	}).blur(function(){
		if ( $(this).val() == \'\' && !$(\'#username_hint\').is(\':visible\') )
		{
			$(\'#username_hint\').fadeIn();
		}
	});
	
	$(\'#password\').focus(function(){
		$(\'#password_hint\').fadeOut();
	}).blur(function(){
		if ( $(this).val() == \'\' )
		{
			$(\'#password_hint\').fadeIn();
			eventListener();
		}
	});
	
	$(\'#username_hint\').click(function(){
		$(\'input#username\').focus();
	});
	$(\'#password_hint\').click(function(){
		$(\'input#password\').focus();
	});
	
	/* chrome yellow autocomplete fix */
	var user_agent = navigator.userAgent.toLowerCase();
	
	if ( user_agent.indexOf("chrome") >= 0 )
	{
		$(window).load(function(){
			$(\'input:-webkit-autofill\').each(function(){
				var text = $(this).val();
				var name = $(this).attr(\'name\');
				$(this).after(this.outerHTML).remove();
				$(\'input[name=\'+ name +\']\').val(text);
				$(\'#username_hint\').hide();
				$(\'#password_hint\').hide();
		    });
		});
	}
	else
	{
		$(window).load(function(){
			if ( $(\'input#username\').val() != \'\' )
			{
				$(\'#username_hint\').hide();
			}
			if ( $(\'input#password\').val() != \'\' )
			{
				$(\'#password_hint\').hide();
			}
		});
	}
	
	/* height handler */
	var heightHandler = function(){
		var height = Math.floor((( $(window).height() - 54 ) / 2 ) - 155);
		height = height <= 0 ? 30 : height;
		
		$(\'#middle\').css(\'padding-top\', height);
	};
	
	heightHandler();
	
	$(window).resize(function(){
		heightHandler();
	});
});

var do_listen = false;
var listener_time = 0;
function eventListener()
{
	if ( $(\'#password\').val() != \'\' )
	{
		$(\'#password_hint\').fadeOut(\'fast\');
		return;
	}
	listener_time = setTimeout(\'eventListener()\', 400);
}

'; ?>

//]]>
</script>

<?php echo rlHook::load(array('name' => 'apTplLogin'), $this);?>


</body>
</html>